package com.shop2cn.iapi.shenqisettlement.testcase;

import java.util.HashMap;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.shenqisettlement.parameter.UserBandingBankCardReq;
import com.shop2cn.iapi.shenqisettlement.service.UserBandingBankCardCall;
import com.ymatou.common.lang.CipherUtil;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.shenqi.DGSQBaseService;
import com.ymttest.business.service.shenqi.DGSQBuildProxyChainCallService;
import com.ymttest.database.model.shenqisettlement.BankRequiredField;
import com.ymttest.database.model.shenqisettlement.CompanyInfo;
import com.ymttest.database.model.shenqisettlement.UserBankAccount;
import com.ymttest.database.sqlwapper.godmch.mch_infoWapper;
import com.ymttest.database.sqlwapper.shenqisettlement.CompanyInfoWrapper;
import com.ymttest.database.sqlwapper.shenqisettlement.UserBankAccountWrapper;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;
import com.ymttest.utils.TestDataManager;

public class Ts_UserBandingBankCard {

	private static UserBandingBankCardReq userBandingBankCardReq = null;
	private static UserBandingBankCardCall userBandingBankCardCall = null;

	private static long autotest_goodsOwnerId = Long.valueOf(EnvSetup
			.getData("autotest_goodsOwnerId"));

	private static String key = "123456";

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("用户绑定银行卡");
	}

	@Before
	public void caseUp() {

		userBandingBankCardReq = new UserBandingBankCardReq();
		userBandingBankCardCall = new UserBandingBankCardCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult("api/userBandingBankCardCall");
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	public void verify() throws Exception {
		
//		int type = 0;
//		
//		if (userBandingBankCardReq.getBankRequiredFieldMap().get("country").equalsIgnoreCase("CHN"))
//			type = 3;
//		else
//			type = 1;

		UserBankAccountWrapper userBankAccountWrapper = new UserBankAccountWrapper();
		UserBankAccount account = userBankAccountWrapper
				.selectByUserIdAndType(userBandingBankCardReq.getUserId(), userBandingBankCardReq.getAccountType());

		// 验证userId
		Logger.verifyEquals(userBandingBankCardReq.getUserId(),
				account.getUser_id(), "验证user_id");

		HashMap<String, String> expectMap = userBandingBankCardReq
				.getBankRequiredFieldMap();

		for (HashMap.Entry<String, String> entry : expectMap.entrySet()) {

			if (entry.getKey().equalsIgnoreCase("bankName"))
				Logger.verifyEquals(entry.getValue(), account.getBank_name(),
						"验证bank_name");
			else if (entry.getKey().equalsIgnoreCase("bankBranch"))
				Logger.verifyEquals(entry.getValue(), account.getBank_branch(),
						"验证bank_branch");
			else if (entry.getKey().equalsIgnoreCase("bankSwiftCode"))
				Logger.verifyEquals(entry.getValue(),
						account.getBank_swift_code(), "验证bank_swift_code");
			else if (entry.getKey().equalsIgnoreCase("bankRoutingNumber"))
				Logger.verifyEquals(entry.getValue(),
						account.getBank_routing_number(),
						"验证bank_routing_number");
			else if (entry.getKey().equalsIgnoreCase("bankBsbCode"))
				Logger.verifyEquals(entry.getValue(),
						account.getBank_bsb_code(),
						"验证bank_bsb_code");
			else if (entry.getKey().equalsIgnoreCase("holerName"))
				Logger.verifyEquals(entry.getValue(), account.getHoler_name(),
						"验证holer_name");
			else if (entry.getKey().equalsIgnoreCase("country"))
				Logger.verifyEquals(entry.getValue(), account.getCountry(),
						"验证country");
			else if (entry.getKey().equalsIgnoreCase("holerDocNumber"))
				Logger.verifyEquals(
						entry.getValue(),
						CipherUtil.decryptAES(key,
								account.getHoler_doc_number()),
						"验证holer_doc_number");
			else if (entry.getKey().equalsIgnoreCase("holerContact"))
				Logger.verifyEquals(entry.getValue(),
						CipherUtil.decryptAES(key, account.getHoler_contact()),
						"验证holer_contact");
			else if (entry.getKey().equalsIgnoreCase("holerDob"))
				Logger.verifyEquals(entry.getValue(), account.getHoler_dob(),
						"验证holer_dob");
			else if (entry.getKey().equalsIgnoreCase("holerCountry"))
				Logger.verifyEquals(entry.getValue(),
						account.getHoler_country(), "验证holer_country");
			else if (entry.getKey().equalsIgnoreCase("holerAddress"))
				Logger.verifyEquals(entry.getValue(),
						account.getHoler_address(), "验证holer_address");
			else if (entry.getKey().equalsIgnoreCase("iban"))
				Logger.verifyEquals(entry.getValue(), account.getIban(),
						"验证iban");
		}
		
		if (userBandingBankCardReq.getAccountType() == 1) {
			
			Logger.verifyEquals(null, account.getHoler_doc_type(),
					"验证holer_doc_type");
			Logger.verifyEquals("COMPANY", account.getHoler_type(),
					"验证holer_type");

			CompanyInfoWrapper companyInfoWrapper = new CompanyInfoWrapper();

			CompanyInfo actualCompany = companyInfoWrapper
					.selectByUserIdAndAccountType(userBandingBankCardReq.getUserId(), 1);

			Logger.verifyEquals(userBandingBankCardReq.getCompanyName(),
					actualCompany.getCompany_name(), "验证company_name");
			Logger.verifyEquals(userBandingBankCardReq.getCompanyCode(),
					actualCompany.getCompany_code(), "验证company_code");
			Logger.verifyEquals(userBandingBankCardReq.getCompanyLegalPerson(),
					actualCompany.getCompany_legal_person(),
					"验证company_legal_person");
		} else if (userBandingBankCardReq.getAccountType() == 2) {

			Logger.verifyEquals(null, account.getHoler_doc_type(),
					"验证holer_doc_type");
			Logger.verifyEquals("INDIVIDUAL", account.getHoler_type(),
					"验证holer_type");
		} else {

			Logger.verifyEquals("ID", account.getHoler_doc_type(),
					"验证holer_doc_type");
			Logger.verifyEquals("INDIVIDUAL", account.getHoler_type(),
					"验证holer_type");
		}

		String expectCurrency = new mch_infoWapper()
				.selectby(
						MapUtil.hashMap("mchId",
								userBandingBankCardReq.getUserId())).get(0)
				.getCurrency();

		Logger.verifyEquals(expectCurrency, account.getCurrency(), "验证currency");
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_001() {
		Logger.start(true, "用户绑定chn银行卡");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = DGSQBuildProxyChainCallService.createProxychain(
					(int) autotest_goodsOwnerId, 1, true).getSellerId();

			userBandingBankCardReq.setUserId(userId);

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_002() {
		Logger.start(true, "用户绑定hkg银行卡");
		try {

			// 设置国家code
			String countryCode = "HKG";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_003() {
		Logger.start(true, "用户绑定CAN银行卡");
		try {

			// 设置国家code
			String countryCode = "CAN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_004() {
		Logger.start(true, "用户绑定USA银行卡");
		try {

			// 设置国家code
			String countryCode = "USA";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");
			userBandingBankCardReq.setCompanyAddress("autotestAddress");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_005() {
		Logger.start(true, "用户绑定AUS银行卡");
		try {

			// 设置国家code
			String countryCode = "AUS";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_006() {
		Logger.start(true, "用户绑定GBR银行卡");
		try {

			// 设置国家code
			String countryCode = "GBR";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_007() {
		Logger.start(true, "用户绑定DEU银行卡");
		try {

			// 设置国家code
			String countryCode = "DEU";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_008() {
		Logger.start(true, "用户绑定FRA银行卡");
		try {

			// 设置国家code
			String countryCode = "FRA";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_009() {
		Logger.start(true, "用户绑定NZL银行卡");
		try {

			// 设置国家code
			String countryCode = "NZL";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_010() {
		Logger.start(true, "用户绑定JPN银行卡");
		try {

			// 设置国家code
			String countryCode = "JPN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_011() {
		Logger.start(true, "用户绑定KOR银行卡");
		try {

			// 设置国家code
			String countryCode = "KOR";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_012() {
		Logger.start(true, "用户绑定BEL银行卡");
		try {

			// 设置国家code
			String countryCode = "BEL";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_013() {
		Logger.start(true, "用户绑定ESP银行卡");
		try {

			// 设置国家code
			String countryCode = "ESP";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_014() {
		Logger.start(true, "用户绑定ITA银行卡");
		try {

			// 设置国家code
			String countryCode = "ITA";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_015() {
		Logger.start(true, "用户绑定NLD银行卡");
		try {

			// 设置国家code
			String countryCode = "NLD";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(true, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(0, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");

			verify();

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_016() {
		Logger.start(true, "用户绑定国外银行卡，缺少CompanyCode");
		try {

			// 设置国家code
			String countryCode = "CAN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("公司营业执照号不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_017() {
		Logger.start(true, "用户绑定国外银行卡，缺少CompanyLegalPerson");
		try {

			// 设置国家code
			String countryCode = "CAN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");
			userBandingBankCardReq.setCompanyAddress("autotestAddress");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("公司法人不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_018() {
		Logger.start(true, "用户绑定国外银行卡，缺少CompanyName");
		try {

			// 设置国家code
			String countryCode = "CAN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyPhoto(countryCode
					+ "_companyPhoto");
			userBandingBankCardReq.setCompanyPhoto2(countryCode
					+ "_companyPhoto2");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("公司全称不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_019() {
		Logger.start(true, "用户绑定国外银行卡，缺少CompanyPhoto");
		try {

			// 设置国家code
			String countryCode = "CAN";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);
			userBandingBankCardReq.setCompanyCode(TestDataManager
					.getRandomNum(8));
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager
					.getChineseName());
			userBandingBankCardReq.setCompanyName(TestDataManager
					.getChineseName() + "_companyName");
			userBandingBankCardReq.setCompanyAddress("autotestAddress");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("营业执照照片不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_020() {
		Logger.start(true, "用户绑定银行卡，缺少countryCode");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			// bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("国家三字码不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_021() {
		Logger.start(true, "用户绑定银行卡，缺少userId");
		try {

			// 设置国家code
			String countryCode = "CHN";

			// long userId = 500030312;

			// userBandingBankCardReq.setUserId(userId);

			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");
			
			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("userId:must be greater than or equal to 1",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_022() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankBranch");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankBranch");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("银行支行不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_023() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息holerName");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("holerName");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("账户名称不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_024() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankName");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankName");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("开户银行不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_025() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankAccountNumber");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankAccountNumber");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("银行卡不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_UserBandingBankCard_026() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息holerContact");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("holerContact");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("银行预留手机号不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	@Ignore
	public void Tc_UserBandingBankCard_027() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息holerDocNumber");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("holerDocNumber");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("身份证号码不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_028() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankSwiftCode");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = 500030312;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(3);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankSwiftCode");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("银行国际代码不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_029() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankRoutingNumber");
		try {

			// 设置国家code
			String countryCode = "USA";

			int userId = 500030967;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankRoutingNumber");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("Routing Code不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_030() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息holerAddress");
		try {

			// 设置国家code
			String countryCode = "USA";

			int userId = 500030967;

			userBandingBankCardReq.setUserId(userId);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("holerAddress");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("地址不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_031() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息bankBsbCode");
		try {

			// 设置国家code
			String countryCode = "AUS";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("bankBsbCode");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("BSB NO不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_032() {
		Logger.start(true, "用户绑定银行卡，缺少银行卡必填信息iban");
		try {

			// 设置国家code
			String countryCode = "GBR";

			int userId = DGSQBaseService.createGoodsOwner(countryCode);
			
			userBandingBankCardReq.setAccountType(2);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");

			userBandingBankCardReq.setUserId(userId);

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			bankRequiredFieldMap.remove("iban");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("IBAN不能为空！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_UserBandingBankCard_033() {
		Logger.start(true, "用户绑定chn银行卡使用非对私用户，绑定失败");
		try {

			// 设置国家code
			String countryCode = "CHN";

			long userId = DGSQBuildProxyChainCallService.createProxychain(
					(int) autotest_goodsOwnerId, 1, true).getSellerId();

			userBandingBankCardReq.setUserId(userId);

			// 获取国家的必填选项
			List<BankRequiredField> bankRequiredFieldList = DGSQBaseService
					.getBankRequiredFieldsByCountryCode(countryCode);

			HashMap<String, String> bankRequiredFieldMap = new HashMap<String, String>();

			bankRequiredFieldMap.put("country", countryCode);

			for (BankRequiredField bankRequiredField : bankRequiredFieldList) {

				bankRequiredFieldMap.put(
						bankRequiredField.getRequired_field_name(),
						TestDataManager.getRandomNum(10));
			}

			userBandingBankCardReq.setAccountType(1);
			userBandingBankCardReq.setCompanyLegalPerson(TestDataManager.getChineseName());
			userBandingBankCardReq.setCompanyLegalPersonIdType(3);
			userBandingBankCardReq.setCompanyLegalPersonIdNo(TestDataManager.getCardId(30, 5));
			userBandingBankCardReq.setCompanyLegalPersonAddress("autotestAddress");
			userBandingBankCardReq.setCompanyLegalPersonPhoto1("123");
			
			userBandingBankCardReq
					.setBankRequiredFieldMap(bankRequiredFieldMap);

			userBandingBankCardCall.setData(userBandingBankCardReq);
			userBandingBankCardCall.callService();

			Logger.verifyEquals(false, userBandingBankCardCall.isSuccess(),
					"验证success");
			Logger.verifyEquals(2, userBandingBankCardCall.getRetultCode(),
					"验证resultCode");
			Logger.verifyEquals("国内用户只能开通对私人民币账户！",
					userBandingBankCardCall.getRetultMessage(),
					"验证resultMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}
